﻿using Test30.Core;
using Test30.Util;

namespace Test30.Engine
{
    public class ElementBoltAction : BoltAction
    {
        public ElementBoltAction(NotNull<Entity> entity, Vec target, INoun noun, Attack attack)
            : base(entity, target)
        {
            _noun = noun;
            _attack = attack;
        }

        protected override bool OnEffect(Vec pos, Direction direction)
        {
            return Dungeon.HitAt(pos, this, new Hit(_noun, _attack, direction));
        }

        private readonly INoun _noun;
        private readonly Attack _attack;
    }
}
